package com.wd.tech.mvp;

import com.wd.tech.contracts.Contract;
import com.wd.tech.net.NetUtlis;

import java.util.Map;

/**
 * date:2020/7/2
 * author:王成虎(13671)
 * month:七月
 * function:
 */
public class Model implements Contract.IModel {

    //XBanner
    @Override
    public void ModelGetXBannerInfo(String url, Class cls, Contract.ICallBack callBack) {
        NetUtlis.getInstance().GetXBannerInfo(url, cls, new NetUtlis.NetCallBack() {
            @Override
            public void onSucces(Object o) {
                callBack.onSucces(o);
            }

            @Override
            public void onError(String error) {

            }
        });
    }

    // TODO: 2020/7/2 展示资讯首页
    @Override
    public void ModelGetNewsShow(String url, Map<String, Object> map, Class cls, Contract.ICallBack callBack) {
        NetUtlis.getInstance().GetNewsShow(url, cls, map, new NetUtlis.NetCallBack() {
                    @Override
                    public void onSucces(Object o) {
                        callBack.onSucces(o);
                    }

                    @Override
                    public void onError(String error) {

                    }
                });
    }

}
